<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 1226px;
            height: 600px;
            margin: 0 auto;
            position: relative;
        }
        .mask{
            height: 150px;
            width: 1226px;
            background-color: rgba(0, 0, 0, 0.4);
            position: absolute;
            bottom: 0;
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="./bg.jpg">
        <div class="mask"></div>D
        <!-- mask为遮罩层的意思 -->
    </div>
    
</body>
</html>